home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
gcc
/
ixemlsrc.lha
/
ixemul
/
ixnet
/
Makefile.in
< prev
next >
Wrap
Makefile
|
1996-03-13
|
4KB
|
173 lines
#### Start of system configuration section. ####
srcdir = @srcdir@
ifeq ($(srcdir),.)
srcdir = ../..
endif
VPATH := $(srcdir)
# Common prefix for machine-independent installed files.
prefix = @prefix@
# Common prefix for machine-dependent installed files.
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/Sys/libs
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
RANLIB = @RANLIB@
AR = ar
#### End system configuration section ####
ifdef CATENATE
DEBUG_FLAG = -g
else
DEBUG_FLAG =
endif
# I *love* GNU make!
define catenate
/bin/echo -n creating $@...
/bin/echo "$(^:%=#include \"%\"\n)" >$@
/bin/echo done
endef
FLAVOR_CFLAGS = -m$(CPU) -m$(FPU)
OTHER_CFLAGS = -fomit-frame-pointer
ALL_CFLAGS = $(CFLAGS) $(FLAVOR_CFLAGS) $(OTHER_CFLAGS) $(DEBUG_FLAG) $(INCS)
INCS = -I$(srcdir) -I$(srcdir)/../library -I$(srcdir)/../include
LIB = libixnet.a
SHELL = sh
# Strip the executable (-s), don't look for standard libraries (-nostdlib)
# don't link in crt0.o (-nostartfiles)
# link in some libc.a files (-L../../../glue/no-baserel -lglue)
# need some stuff in libgeneral.a
LINKFLAGS = -nostdlib -nostartfiles -L../../../glue/no-baserel
.s.o:
cp $< x.c
$(CC) $(ALL_CFLAGS) -traditional -E x.c -o x.s
$(CC) $(ALL_CFLAGS) -c x.s -o $@
rm -f x.c x.s
.c.o:
$(CC) $(ALL_CFLAGS) -c $< -o $@
all: ixnet.library ixnet.debug
SRC = bigkey.c buf.c dynahash.c getcrap.c getgrent.c \
gethostid.c gethostnamadr.c getlogin.c getnetbyaddr.c \
getnetbyname.c getnetent.c getpass.c getproto.c getprotoent.c getprotoname.c \
getpwent.c getservbyname.c getservbyport.c getservent.c getttyent.c \
herror.c hfunc.c initgroups.c \
ixnet_close.c ixnet_expunge.c ixnet_init.c ixnet_open.c \
page.c \
rcmd.c res_comp.c res_debug.c res_init.c res_mkquery.c res_query.c \
res_send.c sethostent.c smallfuncs.c socket.c \
syslog.c ttyname.c ttyslot.c
OBSOLETE_SRC = big.c btree.c delete.c hsearch.c insert.c \
lrucache.c lruhash.c lrutils.c ndbm.c search.c seq.c \
split.c storage.c updutils.c utils.c
OBJ = $(SRC:.c=.o)
OBSOLETE_OBJ = $(SRC:.c=.o)
SRC_A4 = set_errno.c siglaunch.c
OBJ_A4 = $(SRC_A4:.c=.o)
OBJ_OTHERS = version.o
SRC_AF = $(filter a% b% c% d% e% f%,$(SRC))
SRC_GI = $(filter g% h% i%,$(SRC))
SRC_JQ = $(filter j% k% l% m% n% o% p% q%,$(SRC))
SRC_RS = $(filter r% s%,$(SRC))
SRC_TZ = $(filter t% u% v% w% x% y% z%,$(SRC))
OBJ_N = start.o
IXLIBS = $(LIB)
LIBS = -lglue -lamiga
ifdef CATENATE
ALL = a4.o af.o gi.o jq.o rs.o tz.o $(OBJ_OTHERS)
else
ALL = $(OBJ) $(OBJ_A4) $(OBJ_OTHERS) #$(OBSOLETE_OBJ)
endif
$(LIB) : $(ALL)
rm -f $@
$(AR) rv $@ $(ALL)
$(RANLIB) $@
ixnet.library: $(OBJ_N) $(IXLIBS) ../../../glue/no-baserel/libglue.a
$(CC) -s $(LINKFLAGS) $(OBJ_N) $(IXLIBS) $(LIBS) -o $@
ixnet.debug: $(OBJ_N) $(IXLIBS)
$(CC) -g $(LINKFLAGS) $(OBJ_N) $(IXLIBS) $(LIBS) -o $@
clean:
rm -rf 680?0
clobber: clean
rm -f Makefile
$(SRC_A4:.c=.o) a4.o: %.o: %.c
$(CC) $(ALL_CFLAGS) -ffixed-a4 -c $< -o $@
start.o: start.s $(srcdir)/version.h $(srcdir)/../include/sys/ixnet_syscall.def ix_internals.h
version.o: $(srcdir)/version.c
a4.c: $(SRC_A4)
@$(catenate)
af.c: $(SRC_AF)
@$(catenate)
gi.c: $(SRC_GI)
@$(catenate)
jq.c: $(SRC_JQ)
@$(catenate)
rs.c: $(SRC_RS)
@$(catenate)
tz.c: $(SRC_TZ)
@$(catenate)
ix_internals.h: create_header
create_header >$@
create_header: create_header.o
create_header.o: create_header.c $(srcdir)/../include/user.h ixnet.h
$(OBJS): ixnet.h ixemul.h
$(OBJS_N): ixnet.h ixemul.h
$(OBJS_T): ixnet.h ixemul.h
$(srcdir)/version.h $(srcdir)/version.c: parse_version ../ixnet_version.in
parse_version $(srcdir)
dep: $(SRC)
$(CC) >deps -MM $(INCS) $(SRC)
#########################################################################